Integrand size = 21, antiderivative size = 84 \[ \int \frac {\sin (e+f x)}{\left (a+b \sec ^2(e+f x)\right )^2} \, dx=\frac {3 \sqrt {b} \arctan \left (\frac {\sqrt {a} \cos (e+f x)}{\sqrt {b}}\right )}{2 a^{5/2} f}-\frac {3 \cos (e+f x)}{2 a^2 f}+\frac {\cos ^3(e+f x)}{2 a f \left (b+a \cos ^2(e+f x)\right )} \]
-3/2*cos(f*x+e)/a^2/f+1/2*cos(f*x+e)^3/a/f/(b+a*cos(f*x+e)^2)+3/2*arctan(c os(f*x+e)*a^(1/2)/b^(1/2))*b^(1/2)/a^(5/2)/f
Result contains complex when optimal does not.
Time = 2.58 (sec) , antiderivative size = 393, normalized size of antiderivative = 4.68 \[ \int \frac {\sin (e+f x)}{\left (a+b \sec ^2(e+f x)\right )^2} \, dx=\frac {(a+2 b+a \cos (2 (e+f x)))^2 \left (\frac {\left (a^2+24 b^2\right ) \arctan \left (\frac {\left (-\sqrt {a}-i \sqrt {a+b} \sqrt {(\cos (e)-i \sin (e))^2}\right ) \sin (e) \tan \left (\frac {f x}{2}\right )+\cos (e) \left (\sqrt {a}-\sqrt {a+b} \sqrt {(\cos (e)-i \sin (e))^2} \tan \left (\frac {f x}{2}\right )\right )}{\sqrt {b}}\right )}{b^{3/2}}+\frac {\left (a^2+24 b^2\right ) \arctan \left (\frac {\left (-\sqrt {a}+i \sqrt {a+b} \sqrt {(\cos (e)-i \sin (e))^2}\right ) \sin (e) \tan \left (\frac {f x}{2}\right )+\cos (e) \left (\sqrt {a}+\sqrt {a+b} \sqrt {(\cos (e)-i \sin (e))^2} \tan \left (\frac {f x}{2}\right )\right )}{\sqrt {b}}\right )}{b^{3/2}}-\frac {a^2 \arctan \left (\frac {\sqrt {a}-\sqrt {a+b} \tan \left (\frac {1}{2} (e+f x)\right )}{\sqrt {b}}\right )}{b^{3/2}}-\frac {a^2 \arctan \left (\frac {\sqrt {a}+\sqrt {a+b} \tan \left (\frac {1}{2} (e+f x)\right )}{\sqrt {b}}\right )}{b^{3/2}}-\frac {16 \sqrt {a} \cos (e+f x) (a+3 b+a \cos (2 (e+f x)))}{a+2 b+a \cos (2 (e+f x))}\right ) \sec ^4(e+f x)}{64 a^{5/2} f \left (a+b \sec ^2(e+f x)\right )^2} \]
((a + 2*b + a*Cos[2*(e + f*x)])^2*(((a^2 + 24*b^2)*ArcTan[((-Sqrt[a] - I*S qrt[a + b]*Sqrt[(Cos[e] - I*Sin[e])^2])*Sin[e]*Tan[(f*x)/2] + Cos[e]*(Sqrt [a] - Sqrt[a + b]*Sqrt[(Cos[e] - I*Sin[e])^2]*Tan[(f*x)/2]))/Sqrt[b]])/b^( 3/2) + ((a^2 + 24*b^2)*ArcTan[((-Sqrt[a] + I*Sqrt[a + b]*Sqrt[(Cos[e] - I* Sin[e])^2])*Sin[e]*Tan[(f*x)/2] + Cos[e]*(Sqrt[a] + Sqrt[a + b]*Sqrt[(Cos[ e] - I*Sin[e])^2]*Tan[(f*x)/2]))/Sqrt[b]])/b^(3/2) - (a^2*ArcTan[(Sqrt[a] - Sqrt[a + b]*Tan[(e + f*x)/2])/Sqrt[b]])/b^(3/2) - (a^2*ArcTan[(Sqrt[a] + Sqrt[a + b]*Tan[(e + f*x)/2])/Sqrt[b]])/b^(3/2) - (16*Sqrt[a]*Cos[e + f*x ]*(a + 3*b + a*Cos[2*(e + f*x)]))/(a + 2*b + a*Cos[2*(e + f*x)]))*Sec[e + f*x]^4)/(64*a^(5/2)*f*(a + b*Sec[e + f*x]^2)^2)
Time = 0.23 (sec) , antiderivative size = 83, normalized size of antiderivative = 0.99, number of steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.238, Rules used = {3042, 4621, 252, 262, 218}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {\sin (e+f x)}{\left (a+b \sec ^2(e+f x)\right )^2} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\sin (e+f x)}{\left (a+b \sec (e+f x)^2\right )^2}dx\) |
\(\Big \downarrow \) 4621 |
\(\displaystyle -\frac {\int \frac {\cos ^4(e+f x)}{\left (a \cos ^2(e+f x)+b\right )^2}d\cos (e+f x)}{f}\) |
\(\Big \downarrow \) 252 |
\(\displaystyle -\frac {\frac {3 \int \frac {\cos ^2(e+f x)}{a \cos ^2(e+f x)+b}d\cos (e+f x)}{2 a}-\frac {\cos ^3(e+f x)}{2 a \left (a \cos ^2(e+f x)+b\right )}}{f}\) |
\(\Big \downarrow \) 262 |
\(\displaystyle -\frac {\frac {3 \left (\frac {\cos (e+f x)}{a}-\frac {b \int \frac {1}{a \cos ^2(e+f x)+b}d\cos (e+f x)}{a}\right )}{2 a}-\frac {\cos ^3(e+f x)}{2 a \left (a \cos ^2(e+f x)+b\right )}}{f}\) |
\(\Big \downarrow \) 218 |
\(\displaystyle -\frac {\frac {3 \left (\frac {\cos (e+f x)}{a}-\frac {\sqrt {b} \arctan \left (\frac {\sqrt {a} \cos (e+f x)}{\sqrt {b}}\right )}{a^{3/2}}\right )}{2 a}-\frac {\cos ^3(e+f x)}{2 a \left (a \cos ^2(e+f x)+b\right )}}{f}\) |
-(((3*(-((Sqrt[b]*ArcTan[(Sqrt[a]*Cos[e + f*x])/Sqrt[b]])/a^(3/2)) + Cos[e + f*x]/a))/(2*a) - Cos[e + f*x]^3/(2*a*(b + a*Cos[e + f*x]^2)))/f)
3.1.43.3.1 Defintions of rubi rules used
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]/a)*ArcTan[x/R t[a/b, 2]], x] /; FreeQ[{a, b}, x] && PosQ[a/b]
Int[((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^2)^(p_), x_Symbol] :> Simp[c*(c*x )^(m - 1)*((a + b*x^2)^(p + 1)/(2*b*(p + 1))), x] - Simp[c^2*((m - 1)/(2*b* (p + 1))) Int[(c*x)^(m - 2)*(a + b*x^2)^(p + 1), x], x] /; FreeQ[{a, b, c }, x] && LtQ[p, -1] && GtQ[m, 1] && !ILtQ[(m + 2*p + 3)/2, 0] && IntBinomi alQ[a, b, c, 2, m, p, x]
Int[((c_.)*(x_))^(m_)*((a_) + (b_.)*(x_)^2)^(p_), x_Symbol] :> Simp[c*(c*x) ^(m - 1)*((a + b*x^2)^(p + 1)/(b*(m + 2*p + 1))), x] - Simp[a*c^2*((m - 1)/ (b*(m + 2*p + 1))) Int[(c*x)^(m - 2)*(a + b*x^2)^p, x], x] /; FreeQ[{a, b , c, p}, x] && GtQ[m, 2 - 1] && NeQ[m + 2*p + 1, 0] && IntBinomialQ[a, b, c , 2, m, p, x]
Int[((a_) + (b_.)*sec[(e_.) + (f_.)*(x_)]^(n_))^(p_.)*sin[(e_.) + (f_.)*(x_ )]^(m_.), x_Symbol] :> With[{ff = FreeFactors[Cos[e + f*x], x]}, Simp[-ff/f Subst[Int[(1 - ff^2*x^2)^((m - 1)/2)*((b + a*(ff*x)^n)^p/(ff*x)^(n*p)), x], x, Cos[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f}, x] && IntegerQ[(m - 1)/ 2] && IntegerQ[n] && IntegerQ[p]
Time = 1.03 (sec) , antiderivative size = 69, normalized size of antiderivative = 0.82
method | result | size |
derivativedivides | \(\frac {-\frac {b \left (\frac {\sec \left (f x +e \right )}{2 a +2 b \sec \left (f x +e \right )^{2}}+\frac {3 \arctan \left (\frac {\sec \left (f x +e \right ) b}{\sqrt {a b}}\right )}{2 \sqrt {a b}}\right )}{a^{2}}-\frac {1}{a^{2} \sec \left (f x +e \right )}}{f}\) | \(69\) |
default | \(\frac {-\frac {b \left (\frac {\sec \left (f x +e \right )}{2 a +2 b \sec \left (f x +e \right )^{2}}+\frac {3 \arctan \left (\frac {\sec \left (f x +e \right ) b}{\sqrt {a b}}\right )}{2 \sqrt {a b}}\right )}{a^{2}}-\frac {1}{a^{2} \sec \left (f x +e \right )}}{f}\) | \(69\) |
risch | \(-\frac {{\mathrm e}^{i \left (f x +e \right )}}{2 f \,a^{2}}-\frac {{\mathrm e}^{-i \left (f x +e \right )}}{2 f \,a^{2}}-\frac {b \left ({\mathrm e}^{3 i \left (f x +e \right )}+{\mathrm e}^{i \left (f x +e \right )}\right )}{a^{2} f \left (a \,{\mathrm e}^{4 i \left (f x +e \right )}+2 a \,{\mathrm e}^{2 i \left (f x +e \right )}+4 b \,{\mathrm e}^{2 i \left (f x +e \right )}+a \right )}-\frac {3 i \sqrt {a b}\, \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}-\frac {2 i \sqrt {a b}\, {\mathrm e}^{i \left (f x +e \right )}}{a}+1\right )}{4 a^{3} f}+\frac {3 i \sqrt {a b}\, \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}+\frac {2 i \sqrt {a b}\, {\mathrm e}^{i \left (f x +e \right )}}{a}+1\right )}{4 a^{3} f}\) | \(195\) |
1/f*(-b/a^2*(1/2*sec(f*x+e)/(a+b*sec(f*x+e)^2)+3/2/(a*b)^(1/2)*arctan(sec( f*x+e)*b/(a*b)^(1/2)))-1/a^2/sec(f*x+e))
Time = 0.28 (sec) , antiderivative size = 201, normalized size of antiderivative = 2.39 \[ \int \frac {\sin (e+f x)}{\left (a+b \sec ^2(e+f x)\right )^2} \, dx=\left [-\frac {4 \, a \cos \left (f x + e\right )^{3} - 3 \, {\left (a \cos \left (f x + e\right )^{2} + b\right )} \sqrt {-\frac {b}{a}} \log \left (-\frac {a \cos \left (f x + e\right )^{2} + 2 \, a \sqrt {-\frac {b}{a}} \cos \left (f x + e\right ) - b}{a \cos \left (f x + e\right )^{2} + b}\right ) + 6 \, b \cos \left (f x + e\right )}{4 \, {\left (a^{3} f \cos \left (f x + e\right )^{2} + a^{2} b f\right )}}, -\frac {2 \, a \cos \left (f x + e\right )^{3} - 3 \, {\left (a \cos \left (f x + e\right )^{2} + b\right )} \sqrt {\frac {b}{a}} \arctan \left (\frac {a \sqrt {\frac {b}{a}} \cos \left (f x + e\right )}{b}\right ) + 3 \, b \cos \left (f x + e\right )}{2 \, {\left (a^{3} f \cos \left (f x + e\right )^{2} + a^{2} b f\right )}}\right ] \]
[-1/4*(4*a*cos(f*x + e)^3 - 3*(a*cos(f*x + e)^2 + b)*sqrt(-b/a)*log(-(a*co s(f*x + e)^2 + 2*a*sqrt(-b/a)*cos(f*x + e) - b)/(a*cos(f*x + e)^2 + b)) + 6*b*cos(f*x + e))/(a^3*f*cos(f*x + e)^2 + a^2*b*f), -1/2*(2*a*cos(f*x + e) ^3 - 3*(a*cos(f*x + e)^2 + b)*sqrt(b/a)*arctan(a*sqrt(b/a)*cos(f*x + e)/b) + 3*b*cos(f*x + e))/(a^3*f*cos(f*x + e)^2 + a^2*b*f)]
\[ \int \frac {\sin (e+f x)}{\left (a+b \sec ^2(e+f x)\right )^2} \, dx=\int \frac {\sin {\left (e + f x \right )}}{\left (a + b \sec ^{2}{\left (e + f x \right )}\right )^{2}}\, dx \]
Time = 0.26 (sec) , antiderivative size = 70, normalized size of antiderivative = 0.83 \[ \int \frac {\sin (e+f x)}{\left (a+b \sec ^2(e+f x)\right )^2} \, dx=-\frac {\frac {b \cos \left (f x + e\right )}{a^{3} \cos \left (f x + e\right )^{2} + a^{2} b} - \frac {3 \, b \arctan \left (\frac {a \cos \left (f x + e\right )}{\sqrt {a b}}\right )}{\sqrt {a b} a^{2}} + \frac {2 \, \cos \left (f x + e\right )}{a^{2}}}{2 \, f} \]
-1/2*(b*cos(f*x + e)/(a^3*cos(f*x + e)^2 + a^2*b) - 3*b*arctan(a*cos(f*x + e)/sqrt(a*b))/(sqrt(a*b)*a^2) + 2*cos(f*x + e)/a^2)/f
Time = 0.31 (sec) , antiderivative size = 72, normalized size of antiderivative = 0.86 \[ \int \frac {\sin (e+f x)}{\left (a+b \sec ^2(e+f x)\right )^2} \, dx=\frac {3 \, b \arctan \left (\frac {a \cos \left (f x + e\right )}{\sqrt {a b}}\right )}{2 \, \sqrt {a b} a^{2} f} - \frac {\cos \left (f x + e\right )}{a^{2} f} - \frac {b \cos \left (f x + e\right )}{2 \, {\left (a \cos \left (f x + e\right )^{2} + b\right )} a^{2} f} \]
3/2*b*arctan(a*cos(f*x + e)/sqrt(a*b))/(sqrt(a*b)*a^2*f) - cos(f*x + e)/(a ^2*f) - 1/2*b*cos(f*x + e)/((a*cos(f*x + e)^2 + b)*a^2*f)
Time = 18.82 (sec) , antiderivative size = 72, normalized size of antiderivative = 0.86 \[ \int \frac {\sin (e+f x)}{\left (a+b \sec ^2(e+f x)\right )^2} \, dx=\frac {3\,\sqrt {b}\,\mathrm {atan}\left (\frac {\sqrt {a}\,\cos \left (e+f\,x\right )}{\sqrt {b}}\right )}{2\,a^{5/2}\,f}-\frac {b\,\cos \left (e+f\,x\right )}{2\,f\,\left (a^3\,{\cos \left (e+f\,x\right )}^2+b\,a^2\right )}-\frac {\cos \left (e+f\,x\right )}{a^2\,f} \]